﻿// -----------------------------------------------------------------------
// <copyright file="AnimatedictureBox.cs" company="">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace CheckersUI
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    
    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public class AnimationHandler : PictureBox
    {
        private int m_topStopPoint;
        private char m_playerSymbol;
        private int m_fromCellRowLocation;
        private int m_fromCellColumnLocation;
        private int m_toCellRowLocation;
        private int m_toCellColumnLocation;
        private eAnimationDirection m_direction;
        private bool m_EndOfAnimation = false;

        private Image m_pawnImage;

        public AnimationHandler()
        {
            GraphicsPath path = new GraphicsPath();
            path.AddEllipse(0, 0, 60, 60);
            this.Region = new Region(path);
            this.SizeMode = PictureBoxSizeMode.AutoSize;
        }

        public bool EndOfAnimation
        {
            get
            {
                return this.m_EndOfAnimation;
            }

            set
            {
                this.m_EndOfAnimation = value;
            }
        }

        public int StopPoint
        {
            get
            {
                return this.m_topStopPoint;
            }

            set
            {
                this.m_topStopPoint = value;
            }
        }

        public char PlayerSymbol
        {
            get
            {
                return this.m_playerSymbol;
            }

            set
            {
                this.m_playerSymbol = value;
            }
        }

        public int ToCellRowLocation
        {
            get 
            {
                return this.m_toCellRowLocation; 
            }

            set 
            {
                this.m_toCellRowLocation = value; 
            }
        }

        public int ToCellColumnLocation
        {
            get
            {
                return this.m_toCellColumnLocation;
            }

            set
            {
                this.m_toCellColumnLocation = value;
            }
        }

        public int FromCellRowLocation
        {
            get
            {
                return this.m_fromCellRowLocation;
            }

            set
            {
                this.m_fromCellRowLocation = value;
            }
        }

        public int FromCellColumnLocation
        {
            get
            {
                return this.m_fromCellColumnLocation;
            }

            set
            {
                this.m_fromCellColumnLocation = value;
            }
        }

        public Image PawnImage
        {
            get
            {
                return this.m_pawnImage;
            }

            set
            {
                this.m_pawnImage = value;
            }
        }

        public eAnimationDirection Direction
        {
            get
            {
                return this.m_direction;
            }

            set
            {
                this.m_direction = value;
            }
        }

        public enum eAnimationDirection
        {
            upRight,
            upLeft,
            downRight,
            downLeft
        }
    }
}
